package com.lantosec.hmrp.modules.supplier.vo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.lantosec.hmrp.modules.supplier.entity.SupplierContract;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.supplier.entity.SupplierContractDetail;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 供应商合同 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SupplierContract对象", description="供应商合同")
public class SupplierContractVO extends BaseVO<SupplierContract> {
    private static final long serialVersionUID = 1L;


    public SupplierContractVO(SupplierContract entity){
        this.contractId = entity.getContractId();
        this.contractNo = entity.getContractNo();
        this.contractName = entity.getContractName();
        this.supplierCode = entity.getSupplierCode();
        this.supplierName = entity.getSupplierName();
        this.thirdParty = entity.getThirdParty();
        this.contractType = entity.getContractType();
        this.operatorId = entity.getOperatorId();
        this.operatorName = entity.getOperatorName();
        this.signDate = entity.getSignDate();
        this.expiryDate = entity.getExpiryDate();
        this.contractSum = entity.getContractSum();
        this.paymentTerms = entity.getPaymentTerms();
        this.contractScan = entity.getContractScan();
        this.contractAttach = entity.getContractAttach();
    }

    @Override
    public SupplierContract convertToEntity(){
        return new SupplierContract(this);
    }


    @ApiModelProperty(value = "合同ID")
    private String contractId;

    @ApiModelProperty(value = "合同编号")
    private String contractNo;

    @ApiModelProperty(value = "合同名称")
    private String contractName;

    @ApiModelProperty(value = "供应商编码")
    private String supplierCode;

    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @ApiModelProperty(value = "第三方")
    private String thirdParty;

    @ApiModelProperty(value = "合同类型")
    private String contractType;

    @ApiModelProperty(value = "经办人ID")
    private String operatorId;

    @ApiModelProperty(value = "经办人名称")
    private String operatorName;

    @ApiModelProperty(value = "签订日期")
    private String signDate;

    @ApiModelProperty(value = "合同终止日期")
    private String expiryDate;

    @ApiModelProperty(value = "合同金额")
    private BigDecimal contractSum;

    @ApiModelProperty(value = "付款条款")
    private String paymentTerms;

    @ApiModelProperty(value = "合同扫描件")
    private String contractScan;

    @ApiModelProperty(value = "合同附件")
    private String contractAttach;

    @ApiModelProperty(value = "合同明细")
    private List<SupplierContractDetail> supplierContractDetails;
    @ApiModelProperty(value = "合同扫描件返回路径")
    private List<Map> scanPathList;
    @ApiModelProperty(value = "合同附件返回路径")
    private List<Map> attachPathList;
}
